<?php
/**
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 */
	defined ('IN_AGORA') or die;

	class AgoraPostController extends AgoraController
	{
		function __construct()
		{
			parent::__construct();
            if ( strpos($_SERVER['PHP_SELF'],'index2.php')!=0 ) $mode='agroup';
            else $mode='';
            
            if ('agroup'==$mode)
            $this->loadDefaultView( null, 'view_agroup');
            else
            $this->loadDefaultView();
						
			$this->id = (int)Agora::getRequestVar('id',null);
			
			
			$topic_username = Agora::getPostVar('topic_username','');
			$topic_username = empty($topic_username) ? $this->agora_user['username'] : $topic_username;
			$topic_email = Agora::getPostVar('guest_email','');
			$topic_email = empty($topic_email) ? false : $topic_email;
			$this->view->assign('topic_username',$topic_username);
			$this->view->assign('topic_email',$topic_email);

			$smilies_model = & Model::getInstance('SmiliesModel');
			$smilies = $smilies_model->loadAll();

			$this->view->assignRef('smilies',$smilies);

			$this->topic_model = & Model::getInstance('TopicModel');
		}
	}
	
